﻿@{
    ViewData["Title"] = "Index";
    Layout = "~/Areas/Console/Views/Shared/_Layout.cshtml";
}
@section head{
    <script type="text/javascript">
        var renderTable;
        var userType = 0;
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            treetable: 'treetable-lay/treetable',
            index: 'lib/index'
        }).use(['table', 'form', 'treetable', 'index', 'laydate'], function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , table = layui.table
                , element = layui.element
                , laydate = layui.laydate;

            //日期范围
            laydate.render({
                elem: '#RegistrationTime'
                , range: true
            });


            // 渲染表格
            renderTable = table.render({
                elem: '#table-datalist'
                , url: '/Console/AccountOpeningReview/GetListJson'
                , toolbar: '#table-datalist-toolbar'
                , limit: 20
                , title: '认证审核列表'
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
                    , { field: 'index', title: '序号' }
                    , { field: 'firstname', title: '姓名' }
                    , { field: 'firstname1', title: '交易平台' }
                    , { field: 'firstname1', title: '服务器' }
                    , { field: 'firstname1', title: '账号类型' }
                    , { field: 'firstname1', title: '杠杆' }
                    , { field: 'firstname1', title: '状态' }
                    , { field: 'firstname1', title: '提交时间' }
                    , { field: 'firstname1', title: '当前审核人' }
                    , { field: 'firstname1', title: '完结时间' }
                    , { field: 'operate', fixed: 'right', title: '操作', toolbar: '#table-datalist-bar', width: 100 }
                ]]
                , id: "tableReload"
                , page: { layout: ['prev', 'page', 'next', 'refresh'] }
                , done: function (res) {
                    if (res.count == 0) {
                        $(".layui-table-main").html('<div class="layui-none">' + top.lang.noData + '</div>');
                    }
                    layer.closeAll('loading');

                    /**多语言初始化 */
                    top.SetListPageLanguage(layui);
                    top.SetSelectLanguage(layui);
                    layui.form.render("select");
                }
            });


            //头工具栏事件
            table.on('toolbar(table-datalist)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                var data = checkStatus.data;

            });

            //监听行工具事件
            table.on('tool(table-datalist)', function (obj) {
                var data = obj.data;

            });

            form.on('submit(search)', function (data) {
                //执行重载
                table.reload('tableReload', {
                    page: { curr: 1, layout: ['prev', 'page', 'next', 'refresh'] }
                    , where: {
                        account: $("#account").val(),
                        currentReviewer: $("#currentReviewer").val(),
                        createDate: $("#createDate").val(),
                        type: $("#type option:selected").val(),
                        state: $("#state option:selected").val()
                    }
                });
            });

        });
    </script>
}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card layui-form" lay-filter="component-form-element">
                <div class="layui-card-body" style="padding: 15px;">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="nameOrAccount">姓名/账户ID</label>
                            <div class="layui-input-inline">
                                <input type="text" name="account" id="account" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="state">状态</label>
                            <div class="layui-input-inline">
                                <select name="state" id="state">
                                    <option value="-1" lay-event="pleaseSelect">请选择</option>
                                    <option value="0" lay-event="noExamine">未提交审核</option>
                                    <option value="1" lay-event="inReview">审核中</option>
                                    <option value="2" lay-event="pass">通过</option>
                                    <option value="3" lay-event="refuse">拒绝</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="state">服务器</label>
                            <div class="layui-input-inline">
                                <select name="state" id="state">
                                    <option value="-1" lay-event="pleaseSelect">请选择</option>
                                    <option value="0" lay-event="noExamine">未提交审核</option>
                                    <option value="1" lay-event="inReview">审核中</option>
                                    <option value="2" lay-event="pass">通过</option>
                                    <option value="3" lay-event="refuse">拒绝</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="state">交易平台</label>
                            <div class="layui-input-inline">
                                <select name="state" id="state">
                                    <option value="-1" lay-event="pleaseSelect">请选择</option>
                                    <option value="0" lay-event="noExamine">未提交审核</option>
                                    <option value="1" lay-event="inReview">审核中</option>
                                    <option value="2" lay-event="pass">通过</option>
                                    <option value="3" lay-event="refuse">拒绝</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="informationType">类型</label>
                            <div class="layui-input-inline">
                                <select name="type" id="type">
                                    <option value="-1" lay-event="pleaseSelect">请选择</option>
                                    <option value="1" lay-event="personalInformation">个人信息</option>
                                    <option value="2" lay-event="financialInformation">财务信息</option>
                                    <option value="3" lay-event="identityInformation">身份信息</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="createDate">创建时间</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" id="createDate" name="createDate" placeholder=" - " lay-key="8">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" lay-event="currentReviewer">当前审核人</label>
                            <div class="layui-input-inline">
                                <input type="text" name="currentReviewer" id="currentReviewer" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item" style="text-align:center;">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit="" lay-filter="search" lay-event="search">搜索</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-tab-content">
                        <table class="layui-hide" id="table-datalist" lay-filter="table-datalist"></table>
                        <script type="text/html" id="table-datalist-bar">
                            <button class="layui-btn layui-btn-sm" lay-event="toExamine">审核</button>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

